

/*
The Impact of Political Apologies on Public Opinion
World Politics

Replication Code for Manuscript
Contact for questions: jonathanchu88@gmail.com
*/

cd "[INSERT FILE DIRECTORY HERE]"



**************************************************************************
**************************************************************************
****************Replicating results from US survey************************
**************************************************************************
**************************************************************************

clear
use US_Survey.dta

**************FIGURE 2 **************************
reg dv_support200 i.treatgroup [pw = weights]
estimates store a

coefplot ///
(a, msymbol(square) msize(vlarge) mfcolor(black) color(black) ciopts(color(black) recast(rcap) )   ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Diff in Approval vs Stay Silent", size(medlarge) margin(medium) color(black) pos(7) ) ///
xlab (-10(10)60 ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apologize" "No Remorse" "' 2 `" "Remorse" "No Apology" "' 3 `" "Apology" "w/ Remorse" "' , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) ) bgcolor(white) ///
legend ( off) xsize(20) ysize(20) ///
name(US_main, replace)

graph export Fig2.tif, width(800) height(800) replace


**********Figure 4 **************************

reg dv_support200 t_apology t_remorse if soc_dom_3==1 
estimates store a
reg dv_support200 t_apology t_remorse if soc_dom_3==2
estimates store b
reg dv_support200 t_apology t_remorse if soc_dom_3==3
estimates store c

coefplot ///
(a, label(Low Soc Dom) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Med Soc Dom)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(High Soc Dom)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", margin(medium)  size(large) color(black) pos(6) ) ///
xlab (-30(10)40 , labsize(medlarge) ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) margin(r=10 l=10) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1) size(medlarge) ) xsize(15) ysize(20) ///
name(US_socdom, replace)



reg dv_support200 t_apology t_remorse if conservative==1
estimates store a
reg dv_support200 t_apology t_remorse if conservative==2
estimates store b
reg dv_support200 t_apology t_remorse if conservative==3
estimates store c

coefplot ///
(a, label(Liberal) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Moderate)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(Conservative)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", margin(medium)  size(large) color(black) pos(6) ) ///
xlab (-30(10)40 , labsize(medlarge) ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) margin(r=10 l=10) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1) size(medlarge) ) xsize(15) ysize(20) ///
name(US_ideology, replace)


reg dv_support200 t_apology t_remorse if nat3==1
estimates store a
reg dv_support200 t_apology t_remorse if nat3==2
estimates store b
reg dv_support200 t_apology t_remorse if nat3==3
estimates store c


coefplot ///
(a, label(Low Nationalism) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Med Nationalism)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(High Nationalism)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", margin(medium)  size(large) color(black) pos(6) ) ///
xlab (-30(10)40 , labsize(medlarge) ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) margin(r=10 l=10) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1) size(medlarge) ) xsize(15) ysize(20) ///
name(US_nat, replace)


graph combine US_nat US_socdom US_ideology, row(1) xsize(20) ysize(10) graphregion( fcolor(white) lcolor(white)) name(fig4a_combined, replace)

graph export Fig4_combined.tif, width(1600) height(800) replace



**********FIgure 6 Left Side **************************
reg dv_support200 t_apology t_remorse if ben_us_3==1
estimates store a
reg dv_support200 t_apology t_remorse if ben_us_3==2
estimates store b
reg dv_support200 t_apology t_remorse if ben_us_3==3
estimates store c

coefplot ///
(a, label(Small Benefit) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Medium Benefit)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(Large Benefit)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", size(medlarge) margin(medium) color(black) pos(6) ) ///
xlab (-30(10)40) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1)) xsize(15) ysize(20) ///
name(Fig6_left, replace)







**************************************************************************
**************************************************************************
****************Replicating results from Japan survey*********************
**************************************************************************
**************************************************************************

clear
use Japan_Survey.dta

**************FIGURE 1 **************************
reg dv_support200_us i.treatgroup if JPN_US_scenario==1 
estimates store a

coefplot ///
(a, msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )   ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Diff in Approval vs Stay Silent", size(medlarge) margin(medium) color(black) pos(7) ) ///
xlab (-10(10)60 ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apologize" "No Remorse" "' 2 `" "Remorse" "No Apology" "' 3 `" "Apology" "w/ Remorse" "' , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) ) bgcolor(white) ///
legend ( off) xsize(20) ysize(20) ///
name(fig1_jpn_us_main, replace)

graph export Fig1.tif, width(800) height(800) replace

************FIGURE 3 **************************
reg dv_support200_sk i.treatgroup_sk 
estimates store a

coefplot ///
(a, msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )   ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Diff in Approval vs Stay Silent", size(medlarge) margin(medium) color(black) pos(7) ) ///
xlab (-30(10)10, labsize(medium) ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apologize" "No Remorse" "' 2 `" "Remorse" "No Apology" "' 3 `" "Apology" "w/ Remorse" "' , ///
labsize(medlarge) tlcolor(white)  ) ///
yscale (lcolor(white) ) ///
graphregion(fcolor(white) lcolor(white) ) bgcolor(white) ///
legend ( off) xsize(20) ysize(20) ///
name(Fig3_jpn_sk_main, replace)

graph export Fig3.tif, width(800) height(800) replace

**********Figure 5 **************************
reg dv_support200_sk t_apology_sk t_remorse_sk if nat3==1 
estimates store a
reg dv_support200_sk t_apology_sk t_remorse_sk if nat3==2
estimates store b
reg dv_support200_sk t_apology_sk t_remorse_sk if nat3==3 
estimates store c


coefplot ///
(a, label(Low Nationalism) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Med Nationalism)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(High Nationalism)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", margin(medium)  size(large) color(black) pos(6) ) ///
xlab (-30(10)40 , labsize(medlarge) ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) margin(r=10 l=10) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1) size(medlarge) ) xsize(15) ysize(20) ///
name(fig5_JPN_SK_nationalism, replace)


reg dv_support200_sk t_apology_sk t_remorse_sk if soc_dom_3==1  
estimates store a
reg dv_support200_sk t_apology_sk t_remorse_sk if soc_dom_3==2 
estimates store b
reg dv_support200_sk t_apology_sk t_remorse_sk if soc_dom_3==3 
estimates store c


coefplot ///
(a, label(Low Soc Dom) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Med Soc Dom)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(High Soc Dom)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", margin(medium)  size(large) color(black) pos(6) ) ///
xlab (-30(10)40  , labsize(medlarge) ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) margin(r=10 l=10) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1) size(medlarge) ) xsize(15) ysize(20) ///
name(fig5_JPN_SK_socdom, replace)


reg dv_support200_sk t_apology_sk t_remorse_sk if conservative3==1  
estimates store a
reg dv_support200_sk t_apology_sk t_remorse_sk if conservative3==2 
estimates store b
reg dv_support200_sk t_apology_sk t_remorse_sk if conservative3==3 
estimates store c

coefplot ///
(a, label(Liberal) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Moderate)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(Conservative)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", margin(medium)  size(large) color(black) pos(6) ) ///
xlab (-30(10)40 , labsize(medlarge) ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) margin(r=10 l=10) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1) size(medlarge) ) xsize(15) ysize(20) ///
name(fig5_JPN_SK_ideology, replace)

graph combine fig5_JPN_SK_nationalism fig5_JPN_SK_socdom fig5_JPN_SK_ideology, ///
row(1) xsize(20) ysize(10) graphregion( fcolor(white) lcolor(white)) name(fig4b_combined, replace)

graph export Fig5_combined.tif, width(1600) height(800) replace



** Figure 6 (Right Side) **************************
reg dv_support200_sk t_apology_sk t_remorse_sk if sk_benefit_jpn3==1  
estimates store a
reg dv_support200_sk t_apology_sk t_remorse_sk if sk_benefit_jpn3==2 
estimates store b
reg dv_support200_sk t_apology_sk t_remorse_sk if sk_benefit_jpn3==3 
estimates store c

coefplot ///
(a, label(Small Benefit) msymbol(square) msize(vlarge) color(black) mfcolor(white) ciopts(color(black) recast(rcap) )  ) ///
(b, label(Medium Benefit)  msymbol(square) msize(vlarge) color(black) mfcolor(black*0.7) ciopts(color(black) recast(rcap) )  ) ///
(c, label(Large Benefit)  msymbol(square) msize(vlarge) color(black) ciopts(color(black) recast(rcap) )  ) ///
, ///
drop (_cons) ///
xscale(noextend) ///
title("Change in Approval", size(medlarge) margin(medium) color(black) pos(6) ) ///
xlab (-30(10)40 ) ///
xline (0, lcolor(gray) lp(dash)) ///
ylab( 1 `" "Apology" "Effect" "' 2 `" "Remorse" "Effect" "'  , ///
labsize(medlarge) tlcolor(white) nogrid ) ///
yscale (lcolor(white)  ) ///
graphregion(fcolor(white) lcolor(white) ) bgcolor(white) ///
legend ( position(11) region( lcolor(white) ) col(1)) xsize(15) ysize(20) ///
name(Fig6_right, replace)


graph combine Fig6_left Fig6_right, row(1) xsize(15) ysize(15) graphregion( fcolor(white) lcolor(white)) name(fig6_combined, replace)

graph export Fig6_combined.tif, width(1600) height(1600) replace








**************************************************************************
**************************************************************************
****************Replicating results for Fig 6 - comparison****************
**************************************************************************
**************************************************************************

clear 
use compare.dta

gen split_bene = ""
replace split_bene = "Japan, Mean = 2.31" if us==0
replace split_bene = "US, Mean = 3.40" if us==1

gen split_nat = ""
replace split_nat = "Japan, Mean = 4.86" if us==0
replace split_nat = "US, Mean = 4.69" if us==1

gen split_socdom = ""
replace split_socdom = "Japan, Mean = 3.29" if us==0
replace split_socdom = "US, Mean = 2.61" if us==1

gen split_cons = ""
replace split_cons = "Japan, Mean = 2.18" if us==0
replace split_cons = "US, Mean = 1.84" if us==1


histogram nationalism, discrete  width(0.5) density fcolor(gray) lcolor(white) by(split_nat, note("") rows(2) ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) ///
xlabel(1(1)7) xtitle(Nationalism) ///
yscale(noextend) ylabel(0(0.2)1, angle(horizontal) nogmin grid nogextend glcolor(gray*0.3) glwidth(vthin) ) ytitle(Density) ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ///
subtitle(, color(black) fcolor(gs12))  xsize(15) ysize(15) ///
name(nat, replace)

histogram socialdom, discrete  width(0.5) density fcolor(gray) lcolor(white) by(split_socdom, note("") rows(2) ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) ///
xlabel(1(1)7) xtitle(Social Dominance) ///
yscale(noextend) ylabel(0(0.2)1, angle(horizontal) nogmin grid nogextend glcolor(gray*0.3) glwidth(vthin) ) ytitle("") ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ///
subtitle(, color(black) fcolor(gs12))  xsize(15) ysize(15) ///
name(socdom, replace)

histogram conservative, discrete width(0.5) density fcolor(gray) lcolor(white) by(split_cons, note("") rows(2) ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) ///
xlabel(1(1)3) xtitle(Conservatism) ///
yscale(noextend) ylabel(0(0.2)1, angle(horizontal) nogmin grid nogextend glcolor(gray*0.3) glwidth(vthin) ) ytitle("")  ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ///
subtitle(, color(black) fcolor(gs12))  xsize(15) ysize(15) ///
name(cons, replace)

histogram benefit, discrete  width(0.5) density fcolor(gray) lcolor(white) by(split_bene, note("") rows(2) ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) ///
xlabel(1(1)5) xtitle(Perceived Benefit) ///
yscale(noextend) ylabel(0(0.2)1, angle(horizontal) nogmin grid nogextend glcolor(gray*0.3) glwidth(vthin) ) ytitle("")  ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) plotregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ///
subtitle(, color(black) fcolor(gs12))  xsize(15) ysize(15) ///
name(benefit, replace)


graph combine nat socdom cons benefit, row(1) graphregion(color(white)) xsize(20) ysize(10)
graph export Fig7_combined.tif, width(2000) height(1000) replace


